#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int main()
{
	FILE* fp;
	FILE* fp1;

	fp = fopen("text.txt", "r");
	if (fp == NULL)
	{
		perror("fopen");
		return 1;
	}
	fp1 = fopen("text-copy.txt", "w");
	int c;
	while ((c = fgetc(fp)) != EOF)
	{
		fputc(c, fp1);
	}

	char* ptr,* a;
	
	fclose(fp);
	return 0;
}